package com.youease.chris.model.vo
{
	public class LayerData
	{
		private var _name:String;
		private var _depth:int;
		private var _tiles:Vector.<TileData>;
		
		public function LayerData(layerName:String,mapData:MapData)
		{
//			this._name = mapData.name+"_"+layerName;
			this._name = layerName;
			
			this._tiles = new Vector.<TileData>();
			for(var i:int=0;i<mapData.mapRows;i++) {
				for(var j:int=0;j<mapData.mapCols;j++) {
					var tileData:TileData = new TileData();
					tileData.gridX = i;
					tileData.gridY = j;
					tileData.textrue = new TextureData();
					this._tiles.push(tileData);
				}
			}
		}
		
		public function set name(name:String):void {
			this._name = name;
		}
		
		public function get name():String {
			return this._name;
		}
		
		public function set depth(depth:int):void {
			this._depth = depth;
		}
		
		public function get depth():int {
			return this._depth;
		}
		
		public function get tiles():Vector.<TileData> {
			return this._tiles;
		}
		
		public function set tiles(tiles:Vector.<TileData>):void {
			this._tiles = tiles;			
		}
	}
}